{% extends "user_contacts/base.html" %}
{% block title %}
<title>All Persons.</title>
{% endblock %}

{% block body %}
  <div class="container">
    <h1>All Persons</h1>
    <a href="{% url 'user_contacts:home' %}">Return Home</a>

    <table border="1" cellpadding="5">
      <tr>
        <th>First Name</th>
        <th>Last name</th>
      </tr>
      {% for person in persons %}
      <tr>
        <td><a href="{% url 'user_contacts:contacts_detail' person.id %}">{{ person.first_name }}</a> </td>
        <td>{{ person.last_name }}</td>
      </tr>
      {% endfor %}
    </table>
    </div>
{% endblock %}
